/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.navid.trafalgar.model.opengl2;

import com.jme3.asset.AssetManager;
import com.jme3.scene.Node;
import com.navid.trafalgar.model.AShipOneModel;

/**
 *
 * @author alberto
 */
public final class ShipOneModel extends AShipOneModel {

    private final class Sail extends AShipOneModel.Sail {

        public Sail(AssetManager assetManager) {
            super(assetManager);
        }

        @Override
        protected void initGeometry() {
            /*Geometry geoSail = new Geometry("vela", new Box(0.1f, 13f, 13f));

            spatialSail.attachChild(geoSail);
            spatialSail.setLocalTranslation(6, 25, 4);*/
             spatialSail.attachChild(((Node)spatial).getChild("Cube.001"));
        }
    }

    private final class Rudder extends AShipOneModel.Rudder {

        public Rudder(AssetManager assetManager) {
            super(assetManager);
        }

        @Override
        protected void initGeometry() {
        }
    }
    

    public ShipOneModel(AssetManager assetManager) {
        super(assetManager);
    }

    @Override
    protected void initGeometry(AssetManager assetManager) {
        spatial = assetManager.loadModel("Models/ship2g/ship2g.j3o");
        spatial.rotate(0f, (float) -Math.PI / 2, 0f);
        this.attachChild(spatial);

        sail = new Sail(assetManager);
        rudder = new Rudder(assetManager);
    }
}
